home *** CD-ROM | disk | FTP | other *** search
/ MacWorld 1999 February / Macworld (1999-02).dmg / Games World / SharewareGames / Xconq 7.2.2 / lib / galaxy.g < prev    next >
Text File  |  1998-05-22  |  16KB  |  558 lines

  1. (game-module "galaxy"
  2.   (title "Galaxy")
  3.   (blurb "the 24th century")
  4.   (variants (see-all) (world-seen) (world-size))
  5. )
  6.  
  7. ; UNITS
  8.  
  9. (unit-type |photon torpedo| (image-name "gxy-pt")
  10.   (help "shoot these at your enemy"))
  11. (unit-type storm-trooper (image-name "soldiers")
  12.   (help "for capturing planets, moons, & death stars"))
  13. (unit-type |SF-1 fighter| (image-name "gxy-f1")
  14.   (help  "moves fast, can hit most things"))
  15. (unit-type transport (image-name "gxy-st")
  16.   (help "for transporting the troopers"))
  17. (unit-type |light cruiser| (image-name "gxy-lc")
  18.   (help "quick lightly armoured cruiser"))
  19. (unit-type battlecruiser (image-name "gxy-cc")
  20.   (help "specially designed for fleet action"))
  21. (unit-type dreadnought (image-name "gxy-dd")
  22.   (help "heavily armoured with deadly phasers"))
  23. (unit-type |death star| (image-name "death-star")
  24.   (help "make your enemies afraid, very afraid..."))
  25. (unit-type moon (image-name "moon")
  26.   )
  27. (unit-type planet (image-name "planet")
  28.   (help "makes stuff (esp. cruisers, dreadnoughts & deathstars)"))
  29.  
  30. (define p |photon torpedo|)
  31. (define s storm-trooper)
  32. (define f |SF-1 fighter|)
  33. (define t transport)
  34. (define l |light cruiser|)
  35. (define b battlecruiser)
  36. (define d dreadnought)
  37. (define @ |death star|)
  38. (define x moon)
  39. (define X planet)
  40.  
  41. ; MATERIALS
  42.  
  43. (material-type photons
  44.   (notes "fuels photon torpedos"))
  45. (material-type matter
  46.   (notes "part of the fuel for ships' movement"))
  47. (material-type anti-matter
  48.   (notes "part of the fuel for ships' movement & phasers"))
  49. (material-type o2
  50.   (notes "for the troopers to breathe"))
  51.  
  52. (define ph photons)
  53. (define m matter)
  54. (define a anti-matter)
  55. (define o o2)
  56.  
  57. ; TERRAIN
  58.  
  59. ;(set grid-color "white")
  60. ;(set unseen-color "black")
  61. ;(set unseen-image-name "black")
  62. (terrain-type vacuum (image-name "navy-blue") (char "."))
  63. (terrain-type nebula (image-name "mists") (char "%"))
  64. (terrain-type blackhole (image-name "black") (char "!"))
  65.  
  66. (set alt-blob-density 10000)
  67. (set alt-blob-height 500)
  68. (set alt-blob-size 50)
  69. (set alt-smoothing 1)
  70. (set wet-blob-density 2000)
  71. (set wet-blob-size 100)
  72.  
  73. (add t* alt-percentile-min ( 0   0  98))
  74. (add t* alt-percentile-max (98  98 100))
  75. (add t* wet-percentile-min ( 0  90   0))
  76. (add t* wet-percentile-max (90 100 100))
  77.  
  78. ; should have low blob density
  79.  
  80. ;; DEFINES
  81.  
  82. (define places (@ x X))
  83. (define planets (x X))
  84. (define movers (p s f t l b d @))
  85. (define starships (t l b d))
  86. (define hosts (t l b d @ x X))
  87. (define guests (p s f))
  88.  
  89. (table vanishes-on
  90.   (u* blackhole true)
  91.   ;; no troops allowed out in space
  92.   (s t* true)
  93. )
  94.  
  95. ;; STARTUP
  96.  
  97. (add places point-value 5000)
  98. (add (s f t l b d @ p) point-value (256 256 255 24 10 200 230 256))
  99.  
  100. (add vacuum country-terrain-min 6)
  101.  
  102. (table favored-terrain
  103.   (u* t* 0)
  104.   (starships vacuum 100)
  105.   (places blackhole 0)
  106.   (places vacuum (70 50 85))
  107.   (places nebula (30 50 15))
  108.   )
  109.  
  110. (add (X x t l b d @ s f) start-with (2 3 2 2 2 1 1 4 5))
  111.  
  112. (table independent-density ((X x) vacuum (20 40)))
  113.  
  114. (set country-radius-min 3)
  115. (set country-separation-min 20)
  116. (set country-separation-max 100)
  117.  
  118. (add (X x) already-seen 100)
  119.  
  120. (add (X x) see-always true)
  121.  
  122. ;; Units always start out full of everything.
  123.  
  124. (table unit-initial-supply (u* m* 20000))
  125.  
  126. ;; THINGS OUT OF CONTROL
  127.  
  128. ;10000 blackhole u* accident
  129. ;"has been sucked into a BLACK HOLE!!" u* accident-message
  130.  
  131. ;; THINGS IN CONTROL
  132.  
  133. ;; Production and Repair
  134.  
  135. (add movers cp (3  2  3  8  9 15 30 150))
  136.  
  137. (table acp-to-create
  138.   ((x X) movers 1)
  139.   ((b d @) p 1)
  140.   (@ f 1)
  141.   )
  142.  
  143. (table cp-on-creation
  144.   ((x X) movers 1)
  145.   (X movers (2 1 1 1 3 4 11 121))
  146.   ((b d @) p (2 3 3))
  147.   (@ f 1)
  148.   )
  149.  
  150. (table acp-to-build
  151.   ((x X) movers 1)
  152.   ((b d @) p 1)
  153.   (@ f 1)
  154.   )
  155.  
  156. (table cp-per-build
  157.   (u* u* 1)
  158.   )
  159.  
  160. (table material-to-create
  161.   (p ph 5)
  162.   )
  163.  
  164. (add (@ x X) hp-recovery 2.00)
  165.  
  166. (table auto-repair
  167.   (u* u* 0)
  168.   ((l b d) f 1.00) 
  169.   ((@ x X) (f t l) 1.00)
  170.   ((@ x X) (b d) 2.00)
  171. )
  172.  
  173. (table auto-repair-range
  174.   (u* u* -1)) ; repair occupants only
  175.  
  176. ;1 movers [ @ x X ] repair
  177. ;1 f starships repair
  178. ;2 d d repair
  179. ;3 starships starships repair
  180.  
  181. ;; Materials
  182.  
  183. (table base-production
  184.   (starships (ph m a) 3)
  185.   (d ph 5)
  186.   (@ m* 30)
  187.   (x m* 40)
  188.   (X m* 50)
  189.   )
  190.  
  191. ;;; the following doesn't make any sense to sts - nebulas
  192. ;;; should be better for material production, not worse
  193. ;100 t* u* productivity
  194. ;50 nebula u* productivity 
  195. ;100 nebula [ x X @ ] productivity
  196.  
  197. (table unit-storage-x
  198.   ;;      p s  f    t   l   b    d    @     x     X
  199.   (u* ph (1 0  0    0  15  20   30   30    60    90)) 
  200.   (u*  m (0 0 34 1500 300 550 1000 5000 10000 20000))
  201.   (u* o2 (0 1  0 1500 300 550 1000 5000 10000 20000))
  202.   (u*  a (0 0  5 1500 300 550 1000 5000 10000 20000))
  203.   )
  204.  
  205. (table base-consumption
  206.   ((f t l b d) m 1)
  207.   ((f t l b d) a 1)
  208.   (p ph 1)
  209.   (s o2 1) ; storm-troopers must die in space
  210.   )
  211.  
  212. (table consumption-per-move
  213.   (f m 1)
  214.   ((t l b d @) (m a) 1)
  215.   (s o2 1)
  216.   )
  217.  
  218. (table hp-per-starve
  219.   (p ph 1.00)
  220.   (s o2 1.00)
  221.   )
  222.  
  223. (table consumption-per-attack
  224.   (f a 1)
  225.   ((t l b d @ x X) a 2)
  226.   )
  227. (table hit-by (u* a 1))
  228.  
  229. ;0 r* u* out-length
  230. ;0 r* u* in-length
  231. ;-1 r* [ f s ] out-length 
  232. ;-1 r* [ x X ] in-length
  233. ;0 s t in-length ; 
  234.  
  235. ; CAPACITY
  236.  
  237. (table unit-capacity-x
  238.   ((l b d) f (1 2 3))
  239.   (t s 5)
  240.   (@ u* 10)
  241.   (@ places 0)
  242.   (@ d 1)
  243.   ((b d) p (2 5))
  244.   (x u* 10)
  245.   (X u* 20)
  246.   (planets planets 0)
  247.   )
  248.  
  249. ;1 u* volume
  250. ;100 u* hold-volume
  251.  
  252. ; MOVEMENT
  253.  
  254. ;                     p  s  f  t  l  b  d  @  x  X
  255. (add u* acp-per-turn (7  1 17  7 12 10 12  4  1  1))
  256.  
  257. (add (x X) speed 0)
  258.  
  259. (table mp-to-enter-terrain
  260.   (u* nebula 2)
  261. )
  262.  
  263. ;17 u* f enter-time
  264. ;100 u* p enter-time
  265.  
  266. (table material-to-move
  267.   (f m 1)
  268.   ((t l b d @) (m a) 1)
  269.   )
  270.  
  271. ;; SIGHT
  272.  
  273. ; nebulas hide stuff
  274. (table visibility
  275.   (u* t* 100)
  276.   (movers nebula 20))
  277.  
  278. ;                     p s f t l b d @ x X
  279. (add u* vision-range (1 1 2 2 3 3 4 7 2 4))
  280.  
  281. ;1 p see-best   ;1
  282. ;0 p see-worst
  283. ;100 [ X x d @ b l ] see-best 
  284. ;60 [ X x d @ b l f t ]  see-worst
  285.  
  286. ;COMBAT
  287.  
  288. ;                        p  s  f  t  l  b  d  @  x   X
  289. (add u* hp-max          (1  1  2  2  5  9 14 31 65 110))
  290. ;(add u* hp-at-max-speed (0 0 0 1 2 4  5  0  5  5))
  291.  
  292. (table hit-chance
  293. ;;       p  s   f   t   l   b   d   @   x   X
  294.   (p u* (0 100 100 100  95  90  85  99 100 100))
  295.   (s u* (0  50  10  30  30  30  20  10  50  50))
  296.   (f u* (0  50  50  70  40  35  30   2   0   0))
  297.   (t u* (0  20  20  50  20  20  20  20   0   0))
  298.   (l u* (0  70  70  70  50  35  30  30   0   0))
  299.   (b u* (0  90  60  85  65  50  40  40   0   0))
  300.   (d u* (0 100  70  95  75  60  50  50   0   0))
  301.   (@ u* (0  60  85  90  80  80  80  50  85  60))
  302.   (x u* (0  10  10  30  20  10   5   5   0   0))
  303.   (X u* (0  20  20  40  30  20  10  10   0   0))
  304.   )
  305.  
  306. (table damage
  307.   (u* u* 1)
  308.   (p u* 2)
  309.   (d u* 2)
  310.   (f d 2)
  311.   (f @ 999)
  312.   (@ u* 50) ;if you see a death star, you should be terrified
  313.   (@ @ 5)   ; (but not so much if you have one yourself!)
  314.   (@ (x X) 999)
  315.   )
  316.  
  317. ;true p self-destruct
  318. ;false p can-counter
  319.  
  320. ;50 guests hosts protect
  321. ;80 u* places protect
  322. ;0 places places protect 
  323. ;30 @ [ x X ] protect 
  324. ;80 p u* protect
  325.  
  326. (table capture-chance
  327.   (s places (20 50 30))
  328.   )
  329.  
  330. (add movers acp-to-disband 1)
  331. (add movers hp-per-disband 99)
  332.  
  333. ;GENERAL STUFF
  334.  
  335. (add u* acp-to-change-side 1)
  336. (add s acp-to-change-side 0)
  337.  
  338. (add s possible-sides (not "independent"))
  339.  
  340. ;;; Scoring.
  341.  
  342. (scorekeeper (do last-side-wins))
  343.  
  344. ;;; Text.
  345.  
  346. (set action-notices '(
  347.   ((destroy u* p) (actor " detonates on " actee "!"))
  348.   ((destroy u* s) (actor " annihilates " actee "!"))
  349.   ((destroy u* l) (actor " zorches " actee "!"))
  350.   ((destroy u* b) (actor " ZORCHES " actee "!"))
  351.   ((destroy u* d) (actor " ZORCHES " actee "!"))
  352.   ))
  353.  
  354. (set event-notices '(
  355.   ((unit-starved s) (0 " suffocates!"))
  356.   ((unit-starved f) (0 " runs out of fuel and disintegrates!"))
  357.   ((unit-starved p) (0 " misses!"))
  358.   ))
  359.  
  360. (set event-narratives '(
  361.   ((unit-starved s) (0 " suffocated"))
  362.   ((unit-starved f) (0 " ran out of fuel and disintegrated"))
  363.   ((unit-starved p) (0 " missed"))
  364.   ))
  365.  
  366. (set action-movies '(
  367.   ((attack p) (sound "explosion-long"))
  368.   ((attack f) (sound "laser"))
  369.   ((attack |SF-1 fighter|) (sound "laser"))
  370.   ((attack l) (sound "laser"))
  371.   ((overrun l) (sound "laser"))
  372.   ((overrun |light cruiser|) (sound "laser"))
  373.   ))
  374.  
  375. ;; NAMES 
  376.  
  377. ;;; Sort of a mishmash, but who cares...
  378.  
  379. (set side-library '(
  380.   (10 (name "Federation") (adjective "Federation"))
  381.   (10 (name "Klingon Empire") (adjective "Klingon"))
  382.   ((adjective "Vulcan"))
  383.   ((adjective "Jedi"))
  384.   ((name "Romulus") (adjective "Romulan"))
  385.   ((adjective "Rebel"))
  386.   ((adjective "Corazan"))
  387.   ((name "Earth") (adjective "Terran"))
  388.   ((adjective "Cylon"))
  389.   ((adjective "Orion"))
  390.   ((adjective "Ferengi"))
  391.   ((adjective "Zen"))
  392.   ((adjective "Time Lord"))
  393.   ((adjective "Kharg"))
  394.   ((adjective "Cyborg"))
  395.   ((adjective "Dalek"))
  396.   ((adjective "Kelvin"))
  397.   ((adjective "Goth"))
  398.   ((adjective "Vogon"))
  399. ))
  400.  
  401. (add (x X) namer "random-planets")
  402.  
  403. (namer random-planets (random
  404. "Argon" "Tertulian" "Atlantis" "Isis" "Cuthka"
  405. "Prene" "Ziul" "Aja" "Hukan" "Burran" 
  406. "Zenon" "Vorscica" "Khakan" "Trantor" "Solcan"
  407. "Cjiny" "Caligula" "Ipaar" "Ryurr" "Mentha"
  408. "Vrudn" "Martel" "Loki" "Mendelan"
  409. "Saure" "Juvak" "Kaos" "Irrenbuk" "Calazan"
  410. "Ether" "Astral" "Keeguran" "Dospas" "Centari"
  411. "Alpha" "Guerilli" "Galeo" "Charon" "Appolo"
  412. "Ulam Batar" "Urishina" "Zaariana" "Shadowfax"
  413. "Cloudy Coffee"  "with nice beaches" "of the Apes"
  414. "Kyuin" "Reydak" "Baal" "Geryon" "Dispater"
  415. "Azurn" "Mythos" "Nantes" "Kourion" "Turton"
  416. "Moori" "Pelanda" "Sirith" "Celan" "Corolla"
  417. "Muur" "Sol Invictus" "Saladan" "Samnth" "Awe"
  418. "Kvack" "Portuli" "Turin" "Anthran" "Xerxes"
  419. "Zeus" "Keno" "Terre" "Vito" "Vishnu" 
  420. "Visigoth" "Romulus" "Kresge" "Kor" "Kolkhoz"
  421. "Algol" "Quixote" "Quirinal" "Chisholm" 
  422. "Archangel" "Ariananus" "Buran" "Kea" "Tara"
  423. "Gustavus" "Antioch" "Piraeus" "Vaudois" "Vault"
  424. "Rastaan" "Daggoroth" "Beina" "Breton" 
  425. "Gallivent" "Galaak" "Galifre" "Lise" "Abidjan"
  426. "Acanthus" "Achilles" "Actaeon" "Adelia" "Adonis"
  427. "Axla" "Alnu" "Alcestis" "Alkmena" "Alexei"
  428. "Garcia" "New Peoria" "Penelope" "Taurus"
  429. "Bevois" "Odin" "Dwyer" "Aegean" "Vega"
  430. "Altar" "Betelgeuse" "Aldebaran" "Procyon"
  431. "Spica" "Lapella" "Deneb" "Venus" "Mars" 
  432. "Io" "Ganymede" "Europa" "Rigel" "Rigel VII"
  433. "Rigel XII" "DeLorian" "Pyrrus" "New Warth"
  434. "Dorsai" "Xax" "Cygnus X-1" ; its really a black hole but..
  435. "Terminus"  "Felicity" "Sanction" "goes BOOM"
  436. ))
  437.  
  438. (game-module (notes (
  439.   "This period has a number of strange features:"
  440.   " Stormtroopers are terriblly loyal. On your command,"
  441.   "  they will move into outer-space and suffocate."
  442.   " Photon torpedos are generally the most effective means"
  443.   "  of destroying enemy ships; but hold your fire until "
  444.   "  you have enough for the kill."
  445.   " SF-1 fighters have a "Skywalker" chance of destroying Death"
  446.   "  Stars.  Naturally, its a suicide run.  "
  447.   " Blackholes will eat any ships you put into them.  So"
  448.   "  watch for them."
  449.   ""
  450.   "The machine players haven't figured any of this out. "
  451.   " Thus, their play is less than wonderful."
  452.   ""
  453.   ""
  454. ;; this should probably be part of the module header,
  455. ;; so can be displayed in appropriate contexts.
  456.   " by Victor Mascari"
  457.   "Copyright 1991, Henry Ware & Victor Mascari"
  458.   "Please distribute this, rewrite it etc. However,"
  459.   "you may not sell it, and this message must remain"
  460.   "intact.  Of course, if you do any of these things, we"
  461.   "will never know."
  462.   "Converted to version 7 by Stan Shebs."
  463.   ""
  464.   " Thanks to the writter of the 'Starwars'"
  465.   "  period for icons and ideas, and to "
  466.   "  Henry Ware for some icons and technical"
  467.   "  advice."
  468.  
  469.   "This period was written by Victor Mascari at The Ohio State University."
  470.   ""
  471.   "Strategy depends upon size of the map you're playing on. The smaller the"
  472.   "map, the smaller unit that should be built. Large maps require big fleets."
  473.   ""
  474.   "Fleets tend to be the preferred method of warfare. In addition, the person"
  475.   "that attacks first usually wins, so gather as much intelligence about"
  476.   "the movements of the enemy as possible, and keep main battle fleet away "
  477.   "from his until you can strike with full force."
  478.   ""
  479.   "Nebula hide ships 80% of the time, but also slow them down."
  480.   ""
  481.   "5 photon torpedos are needed to destroy a moon, 8 for a planet."
  482.   ""
  483.   "Blackholes are hard to spot, so pay attention to where your moving or else"
  484.   "you'll loose your ship."
  485.   ""
  486.   "The computer is fairly stupid in this period and is fairly easy to defeat. The"
  487.   "skills learned to defeat the computer will, in general, not apply to human"
  488.   "opponents."
  489. )))
  490.  
  491. (add @ notes (
  492.   "The Death Star is the most powerful unit in this period.  In close quarters"
  493.   "other units can be flattened, however Death Stars can be captured by"
  494.   "storm troopers and have some vulnerability to fighters. They are the"
  495.   "only moving unit which repairs itself once a turn."
  496. ))
  497. (add p notes (
  498.   "The Photon Torpedo is the main means of attack.  It has a range of seven"
  499.   "and does two points of damage to any other unit.  It's wise to save these"
  500.   "until you have enough to kill a big ship in one turn: wounded ships often"
  501.   "make it home."
  502. ))
  503. (add s notes (
  504.   "Storm Trooper suffocate in outer space, so don't put them there.  "
  505. ))
  506. (add f notes (
  507.   "Fighters are good for reconnaissance and for harrasing the enemy battle"
  508.   "cruisers.  Send them, take a point of damage, and come home. As"
  509.   "previously mentioned they have a slim chance of destroying a Death Star"
  510.   "in one hit, however, its a suicide run."
  511. ))
  512. (add t notes (
  513.   "Transports are, naturally, vulnerable and sorta slow."
  514. ))
  515. (add l notes (
  516.   "Light Cruisers are the smallest of the fleet ships.  They are very vulnerable"
  517.   "in fleet combat however, especially to dreadnoughts.  They are good at"
  518.   "reconnaissance.  The main use of light cruisers"
  519.   "is to provide bait to attract his ships or, occasionally, to eat up his"
  520.   "photon torpedos."
  521. ))
  522. (add b notes (
  523.   "Battle Cruisers provide photon torpedos.  Generally, they provide the"
  524.   "backbone of a battle fleet."
  525. ))
  526. (add d notes (
  527.   "Dreadnoughts are the largest of the fleet ships and are tough in close"
  528.   "combat.  But, despite the name, it best to play these ships with a"
  529.   "certain amount of caution; one dreadnought can not take on a fleet,"
  530.   "and Death Stars demand a respectful amount of distance."
  531. ))
  532.  
  533. (add x notes (
  534.   "Planets and moons are the main producers.  Generally, the more powerful"
  535.   "the unit to be constructed, the better it is to produce it in a planet."
  536.   "As for the defense of these units, there are several schools of thought."
  537.   "One school says the best defense is a good offense.  Another holds"
  538.   "that fighter patrols are cheap and effective against enemy landings."
  539.   "Or that a loaded transport should be kept to retake any enemy conquests,"
  540.   "and as defense against a deathstar.  Some people like to supply their"
  541.   "planets with a large number of torpedos.  Finally, some people like to"
  542.   "let the enemy bombard their planets, thus 'wasting' torpedos and "
  543.   "allowing the defender to destroy the attacking fleet.   "
  544. ))
  545.  
  546. (add X notes (
  547.   "Planets and moons are the main producers.  Generally, the more powerful"
  548.   "the unit to be constructed, the better it is to produce it in a planet."
  549.   "As for the defense of these units, there are several schools of thought."
  550.   "One school says the best defense is a good offense.  Another holds"
  551.   "that fighter patrols are cheap and effective against enemy landings."
  552.   "Or that a loaded transport should be kept to retake any enemy conquests,"
  553.   "and as defense against a deathstar.  Some people like to supply their"
  554.   "planets with a large number of torpedos.  Finally, some people like to"
  555.   "let the enemy bombard their planets, thus 'wasting' torpedos and "
  556.   "allowing the defender to destroy the attacking fleet.   "
  557. ))
  558.